/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.siseventos.dao.da;

import br.siseventos.model.TbEvento;
import java.util.Date;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.criterion.Expression;
import org.hibernate.criterion.Restrictions;

/**
 *
 * @author marcosnatanpacheco
 */
public class EventoDAO extends BaseDAO<TbEvento> {

    public EventoDAO() {

    }

    public List consultarTodos(Date dataInicio, Date dataTermino) {
        Criteria c = hib.createCriteria(TbEvento.class);
        List l = null;
        if (dataInicio != null && dataTermino != null) {
            c.add(Restrictions.between("dtaInicioEvento", dataInicio, dataTermino));
            l = c.list();
        }
        return l;
    }
    
    
}
